The graph of nodes
Starting position to go to
The end position
The positions between start and end
Sum of weights (cost) to get to goal from start
GridWithWeights!(XY, int) grid = diagram4(); XY[XY] came_from; int[XY] cost_so_far; a_star_search(grid, XY(1, 4), XY(7, 8), came_from, cost_so_far); XY[] path = reconstruct_path(came_from, XY(1, 4), XY(7, 8)); // TODO: asserts
Locates the next node in graph to get to a position Uses A* search algorithm Can use any sortable value type